import $axios from './index.js'

// 栏目列表
function columnList(data) {
  const url = '/category/index'
  return $axios.get(url, data)
}
// 栏目详情
function columnInfo(data) {
  const url = '/category/read'
  return $axios.get(url, data)
}
// 栏目添加
function columnSave(data) {
  const url = '/category/save'
  return $axios.post(url, data)
}
// 栏目编辑
function columnUpdate(data) {
  const url = '/category/update'
  return $axios.post(url, data)
}
// 栏目删除
function columnDelete(data) {
  const url = '/category/delete'
  return $axios.post(url, data)
}

// 栏目内容列表
function contentList(data) {
  const url = '/content/index'
  return $axios.get(url, data)
}
// 栏目内容详情
function contentInfo(data) {
  const url = '/content/read'
  return $axios.get(url, data)
}
// 栏目内容添加
function contentSave(data) {
  const url = '/content/save'
  return $axios.post(url, data)
}
// 栏目内容编辑
function contentUpdate(data) {
  const url = '/content/update'
  return $axios.post(url, data)
}
// 栏目内容删除
function contentDelete(data) {
  const url = '/content/delete'
  return $axios.post(url, data)
}
// 栏目内容字段
function contentCreate(data) {
  const url = '/content/create'
  return $axios.get(url, data)
}
// 栏目副表内容
function mainContent(data) {
  const url = '/content/mainContent'
  return $axios.get(url, data)
}
// 是否置顶
function topOpt(data) {
  const url = '/content/topOpt'
  return $axios.post(url, data)
}
// 是否推荐--状态
function recommendAndStatus(data) {
  const url = '/content/recommendAndStatus'
  return $axios.post(url, data)
}
// 插入为内链
function addInnerChat(data) {
  const url = '/content/addInnerChat'
  return $axios.post(url, data)
}
export default {
  columnList,
  columnSave,
  columnUpdate,
  columnDelete,
  columnInfo,
  contentList,
  contentSave,
  contentUpdate,
  contentDelete,
  contentInfo,
  contentCreate,
  mainContent,
  topOpt,
  recommendAndStatus,
  addInnerChat
}
